# 放置全局变量的类
class g_varial:
    # 内置属性 定义一个空字典
    _dic = {}
    # 修改、添加key value
    def set_dict(self,key,value):
        self._dic[key] = value

    # 通过key获取数据
    def get_dic(self,key):
        return self._dic.get(key,None)
    # 字典中添加另一个字典
    def set_by_dict(self,dic):
        self._dic.update(dic)
    # 显示全局中的所有值
    def show_dic(self):
        return self._dic

if __name__ == '__main__':
    # getvarial = g_varial()
    # getvarial.set_dict("login_token","abcdefg")
    # token = getvarial.get_dic("login_token")
    # print(token)

    g_varial().set_dict("address_id123", "32042")